﻿
Imports std

Public Module property_creator
    Public Function cached(Of T)(ByVal i As iproperty(Of T)) As iproperty(Of T)
        Return New cached_property_wrapper(Of T)(i)
    End Function

    Public Function bytes_int64(ByVal i As iproperty(Of bytes)) As iproperty(Of Int64)
        Return New bytes_int64_wrapper(i)
    End Function

    Public Function bytes_string(ByVal i As iproperty(Of bytes)) As iproperty(Of String)
        Return New bytes_string_wrapper(i)
    End Function

    Public Function bytes_vector_string(ByVal separator As String,
                                        ByVal ignore_empty_entities As Boolean) As [property].wrapper_d
        Return Function(i As iproperty) As iproperty
                   Return New bytes_vector_string_wrapper(i, separator, ignore_empty_entities)
               End Function
    End Function

    Public Function bytes_vector_int64(ByVal i As iproperty(Of bytes)) As iproperty(Of vector(Of Int64))
        Return New bytes_vector_int_wrapper(i)
    End Function

    Public Function bytes_set_string(ByVal separator As String,
                                     ByVal ignore_empty_entities As Boolean) As [property].wrapper_d
        Return Function(i As iproperty) As iproperty
                   Return New bytes_set_string_wrapper(i, separator, ignore_empty_entities)
               End Function
    End Function

    Public Function bytes_set_int64(ByVal i As iproperty(Of bytes)) As iproperty(Of [set](Of Int64))
        Return New bytes_set_int_wrapper(i)
    End Function
End Module
